<?php

class Article_model extends CI_Model {
    function __construct()
    {
        parent::__construct();
    }
	public function getArticleList(){
		$query = $this->db->get('blog_article');

		return $query->result();
	}
	public function getArticleByType($type, $limit=null, $offset=null){
		$query = $this->db->get_where('blog_article',array('type'=>$type), $limit, $offset);
		return $query->result();
	}
	public function getArticleById($aid){
		$query = $this->db->get_where('blog_article',array('id'=>$aid));
		return $query->result();
	}
}
?>